#pragma once
//#include "afxwin.h"
//
//
//#if _MSC_VER > 1000
//#pragma once
//#endif // _MSC_VER > 1000
// FaceDialog.h : header file
//

#include <map>
#include "Picture\\Picture.h"
#include "Picture\\PictureEx.h"

using namespace std;
typedef map< int , CString >PICTURE_MAP;
/////////////////////////////////////////////////////////////////////////////
// CFaceDialog dialog

class CFaceDialog : public CDialog
{
public:

	CFaceDialog(CWnd* pParent = NULL);

	virtual BOOL Create( CWnd * pWnd );
	CString GetSelectPicture( void );
	//{{AFX_DATA(CFaceDialog)
	enum { IDD = IDD_DIALOG_FACE };
	CPictureEx	m_gif;
	//}}AFX_DATA
	void RegisterGetPictureFunction( void ( * OnPicture)( void * pContext , const char * filename ) , void * pContext )
	{
		this->OnPicture = OnPicture;
		this->pContext = pContext;
	}
protected:
	void LoadPicture( void );
	void Select( const CPoint & point );
	//{{AFX_VIRTUAL(CFaceDialog)
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CFaceDialog)
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	afx_msg void OnPaint();
	virtual BOOL OnInitDialog();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CBitmap      bitmap;
	PICTURE_MAP  picture_map;
	int          select;
	void ( * OnPicture)( void * pContext , const char * filename );
	void * pContext;
};

